package com.obao.user.service;

import com.obao.business.entity.Product;
import com.obao.business.entity.ProductFlavor;
import com.obao.business.entity.ProductSize;
import com.obao.user.entity.BusinessItem;
import com.obao.user.entity.Cart;
import com.obao.user.entity.ProductItem;
import com.obao.user.entity.User;

import java.util.List;


public interface ICartService {
	/**
	 * 添加到购物车业务接口
	 * @param user
	 * @param buyNumber
	 * @param product
	 * @param productFlavor
     * @param productSize
     */
	void save(User user, int buyNumber, Product product, ProductFlavor productFlavor, ProductSize productSize);

	/**
	 * 查找用户购物车
	 * @param user
	 * @return
	 */
	Cart findCart(User user);

	/**
	 * 删除
	 * @param productItemId
     */
	void delete(Integer productItemId);

	/**
	 * 购物车结算
	 * @param businessItemIds
	 * @param productItemIds
     * @return
     */
	List<BusinessItem> findBuyingBill(String businessItemIds, String productItemIds);
}
